﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using YSC_Services.BLL.Services.Interfaces;

namespace YSC_Backstage_Web.Controllers
{
    /// <summary>
    /// 产地价格
    /// </summary>
    public class PlaceOfOriginPriceController : Controller
    {
        private IComprehensivePriceBackstageServices _rep;

        public PlaceOfOriginPriceController(IComprehensivePriceBackstageServices rep)
        {
            this._rep = rep;
        }

        /// <summary>
        /// 产地价格(每日)
        /// </summary>
        /// <returns></returns>
        public IActionResult DailyList()
        {
            return View();
        }

        public IActionResult List()
        {
            return View();
        }

        /// <summary>
        /// 产地价格
        /// </summary>
        /// <param name="index"></param>
        /// <param name="size"></param>
        /// <param name="areName"></param>
        /// <param name="startDate"></param>
        /// <param name="endDate"></param>
        /// <param name="sasearch"></param>
        /// <returns></returns>
        public JsonResult PlaceOfOriginPriceAll(int index, int size, string fishType, string dataType, string fishName, string areName, string areCode, string dateMonth, string startDate, string endDate, string sasearch)
        {
            var ret = _rep.PlaceOfOriginPriceAll(index, size, fishType, dataType, fishName, areCode, areName, dateMonth, startDate, endDate, sasearch);
            return Json(ret);
        }

        /// <summary>
        /// 产地价格 鱼种分析
        /// </summary>
        /// <param name="dateYears"></param>
        /// <param name="fishName"></param>
        /// <param name="areName"></param>
        /// <returns></returns>
        public JsonResult PlaceOfOriginPriceYearsAll(string dateYears, string fishName, string areName, string areCode)
        {
            var ret = _rep.PlaceOfOriginPriceYearsAll(dateYears, fishName, areName, areCode);
            return Json(ret);
        }

        /// <summary>
        /// 产地价格(每日)
        /// </summary>
        /// <param name="index"></param>
        /// <param name="size"></param>
        /// <param name="areName"></param>
        /// <param name="dateTime"></param>
        /// <param name="sasearch"></param>
        /// <returns></returns>
        public JsonResult PlaceOfOriginDailyPriceAll(int index, int size, string areName, string dateTime, string sasearch)
        {
            var ret = _rep.PlaceOfOriginDailyPriceAll(index, size, areName, dateTime, sasearch);
            return Json(ret);
        }

        /// <summary>
        /// 产地价格详情(每日)
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="placeOfOriginId"></param>
        /// <param name="dateTime"></param>
        /// <returns></returns>
        public JsonResult PlaceOfOriginsDailyPriceAll(string userId, string placeOfOriginId, string dateTime)
        {
            var ret = _rep.PlaceOfOriginsDailyPriceAll(userId, placeOfOriginId, dateTime);
            return Json(ret);
        }
    }
}